#ifndef __MAIN_SCENE_H__
#define __MAIN_SCENE_H__

#include "cocos2d.h"
#include "format.h"
#include "TypingFrame.h"
#include "HelloWorldScene.h"
#include "WaitForConect.h"
#include "CharactersLayer.h"
USING_NS_CC;
#define MAIN_LAYER_TAG				1
#define SETING_LAYER_TAG			2
#define TYPING_LAYER_TAG			3
#define WAIT_FOR_CONNECT_TAG		4
#define CHOSE_CHARACTER_LAYER_TAG	5
#define sMainScene					MainScene::GetInstance()
#define sSettingLayer				((Layer*)sMainScene->getChildByTag(SETING_LAYER_TAG))
#define sMainLayer					((HelloWorld*)sMainScene->getChildByTag(MAIN_LAYER_TAG))
#define sChoseCharacterLayer		((ChoseCharacterLayer*)sMainScene->getChildByTag(CHOSE_CHARACTER_LAYER_TAG))

class MainScene	: public Scene
{
public:
	MainScene();
	~MainScene();
	CREATE_FUNC(MainScene);
	virtual bool init();
	static MainScene* GetInstance();
	void SwapLayerByTag(uint16 Changed, uint16 Instead);
private:

	Layer* InitPageByTag(uint16 Tag);
	HelloWorld* MainPage;
	SettingsLayer* SettingPage;
	TypingFrame* TypingPage;
	WaitForConnectLayer* WaitForConnectPage;
};

#endif